
#include "iostream"
#include "vector"
#include "unordered_map"
#include "unordered_set"
#include "algorithm"
#include "string"
#include "list"
#include "string.h"

class OneLoop {
public:

    std::vector<char> path;
    int cnt=0;
    void dfs(int pos){
        if(pos>path.size()){
            return;
        }
        if(path[pos-1]==1){
            return;
        }
        if(pos==path.size()){
            cnt++;
        }
        dfs(pos+1);
        dfs(pos+2);
    }
    void run(
           int a,int b
    ) {
        path.resize(a);
        for(int i=0;i<b;i++){
            int in;std::cin>>in;
            path[in-1]=1;
        }
        dfs(1);
        printf("%d\n",cnt);
    }
};

class Solution {
public:
    void run() {

        bool first = true;
        int a, b, c, d, e;
        std::string s1, s2;
        while (
                std::cin >> a>>b
                ) {
//            std::getline(std::cin,s2);
            auto cc=std::cin.get();//换行
            OneLoop loop;
            loop.run(a,b);
        }

    }
};

int main() {
//    bool cur_num= true;
    Solution().run();
    return 0;
}

